package com.gaogzhen.juc.visibility.volatileTest;

public class Test02 {
    static volatile int x;

    public static void main(String[] args) {
        new Thread(() -> {
            x = 10;
        }, "t1").start();

        new Thread(() -> {
            System.out.println(x);
        }, "t2").start();
    }
}
